//引入mongoose模块
let mongoose = require('mongoose');
//创建目标集合的模型对象
let classSchema = new mongoose.Schema({
    name: String,
    credit: Number,
    attribute: Number
});
//建立模型队形与数据库中数据集合的关联关系
let classModel = mongoose.model('classModel', classSchema, 'class');